/* 
 * File:   ID.cpp
 * Author: Saulo
 * 
 * Created on 23 de Maio de 2010, 21:58
 */

#include "ID.h"

ID::ID() {

}

void ID::identifica(string buffer){

    vector<string> results;
    int cutAt;
    while ((cutAt = buffer.find_first_of(" ,")) != buffer.npos) {
        if (cutAt > 0) {
            results.push_back(buffer.substr(0, cutAt));
        }
        buffer = buffer.substr(cutAt + 1);
    }
    if (buffer.length() > 0) {
        results.push_back(buffer);
    }
    this->buffer = results;

}

vector<string> ID::getBuffer(){
    return this->buffer;
}

ID::ID(const ID& orig) {
}

ID::~ID() {
}

